package com.abc.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Positive;
import lombok.Data;

import java.util.List;

/**
 * Siliconflow Rerank API 请求参数
 */
@Data
@Schema(description = "重排序请求参数")
public class RerankRequestDto {

    @NotEmpty(message = "文档列表不能为空")
    @Schema(description = "待重排序的文档列表", example = "[\"apple\", \"banana\", \"fruit\", \"vegetable\"]")
    private List<String> documents;

    @NotBlank(message = "模型名称不能为空")
    @Schema(description = "重排序模型名称", example = "BAAI/bge-reranker-v2-m3")
    private String model = "BAAI/bge-reranker-v2-m3";

    @NotBlank(message = "查询文本不能为空")
    @Schema(description = "查询文本", example = "大香蕉")
    private String query;

    @Positive(message = "返回结果数量必须大于0")
    @Schema(description = "返回前N个结果", example = "10")
    private Integer topN = 3;

    @Schema(description = "是否返回文档内容", example = "true")
    private Boolean returnDocuments = true;

    @Schema(description = "每个文档的最大分块数", example = "10")
    private Integer maxChunksPerDoc = 10;

    @Schema(description = "重叠token数", example = "100")
    private Integer overlapTokens = 100;
}
